package cn.com.oceansoft.osc.ms.config;


import org.bouncycastle.cms.PasswordRecipientId;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 系统全局常量
 *
 * @author chenw
 * @create 2017-01-04 17:11
 * @email javacspring@gmail.com
 */
@Configuration
public class AppConstant {


    public static final  String SIGN_PERFIX="YNGA";

    public  static  final  int SIGN_ERROR=181002;

    public static  final int DATA_NOTFOUND=181003;
    public static  final int DATA_SUCCESS=181001;

    //EMS请求失败
    public  static  final  int EMS_REQUEST_ERROR=171001;

    //EMS请求返回空值
    public  static  final  int EMS_REQUEST_RETURN_NULL=171002;

    //EMS代码运行未知错误
    public static  final  int EMS_REQUEST_RUN_ERROR=171003;
    //EMS数据转换json错误
    public static final  int  EMS_REQUEST_JSON_PASER_ERROR=171004;

    public static final  int VALID_CODE_GUID_EMPTY=171005;

    public static final  int VALID_CODE_EMPTY=171006;

    public static final  int VALID_CODE_ERROR=171007;


    //EMS获取订单单号接口标志
    public static final String EMS_INTERFACE_TAG_MAILNUM_APPLY="ems.inland.mms.mailnum.apply";

    //EMS上面取件接口标志
    public static final String EMS_INTERFACE_TAG_WAY_GOT="ems.inland.waybill.got";
    //EMS下大客户订单接口标志
    public static final String EMS__INTERFACE_TAG_WAY_NORMAL="ems.inland.waybill.create.normal";
    //EMS下大客户地址接口标志
    public static final String EMS_INTERFACE_TAG_ADDRESS="ems.inland.waybill.collect.address";
    //EMS取消订单接口标志
    public static final String EMS_INTERFACE_TAG_CANCEL="ems.inland.waybill.got.cancellation";
    //EMS地址验证接口标志
    public static final String EMS_INTERFACE_TAG_VALID_ADDRESS="ems.inland.collection.validate";


    public static final String EMS_SMS_GOT_QJ_SUCC = "您好，您办件编号为%s的办件上门取件已下单成功，请准备好%s邮寄到%s并准备3份邮寄确认清单，请耐心等待EMS上门取件。";

    public static final String EMS_SMS_GOT_QJ_SUCC_MOUDID="03";

    public static final String EMS_SMS_GOT_SH_SUCC="您好，您办件编号为%s的办件办结送件已下单成功并由%s寄出，请注意查收。";

    public static final String EMS_SMS_GOT_SH_SUCC_MOUDID="04";

    public static final String EMS_SMS_GOT_FAIL="您好，您办件编号为%s的办件,EMS下派送定单失败，请去相应窗口办理。";

    public static final String EMS_SMS_GOT_FAIL_MOUDID="05";

    public static final String EMS_SMS_GOT_BACK_ERR="您的办件，编号：%s，邮递员揽收失败，已自动转为窗口办理，请前往申请办理点办理。";

    public static final String EMS_SMS_GOT_BACK_ERR_MOUDID="06";

    //ems接口参数前缀
    public static final String CONFIG_KEY_EMS_PREFIX="ems";

    /**
     * ems 配置
     */
    @ConfigurationProperties(prefix = CONFIG_KEY_EMS_PREFIX)
    public static class EmsConfig {

        private  String appId;
        private String payAppId;

        private  String author;
        private  String payAuthor;
        private  String appSecret;
        private String paySecret;

        private  String appUrl;
        private  String appVersion;
        private String appVersion2;
        private String   queryVersion;

        private String queryUrl;

        private String priceSn;
        private String priceSw;

        private String priceHcSn;
        private String priceHcSw;
        private String province;
        private String payUrl;
        private String payRefundUrl;
        private String payQueryUrl;

        private String queryAuthor;

        public String getQueryAuthor() {
            return queryAuthor;
        }

        public void setQueryAuthor(String queryAuthor) {
            this.queryAuthor = queryAuthor;
        }

        public String getPaySecret() {
            return paySecret;
        }

        public void setPaySecret(String paySecret) {
            this.paySecret = paySecret;
        }

        public String getPayAppId() {
            return payAppId;
        }

        public void setPayAppId(String payAppId) {
            this.payAppId = payAppId;
        }

        public String getPayAuthor() {
            return payAuthor;
        }

        public void setPayAuthor(String payAuthor) {
            this.payAuthor = payAuthor;
        }



        public String getPayUrl() {
            return payUrl;
        }

        public void setPayUrl(String payUrl) {
            this.payUrl = payUrl;
        }

        public String getPayRefundUrl() {
            return payRefundUrl;
        }

        public void setPayRefundUrl(String payRefundUrl) {
            this.payRefundUrl = payRefundUrl;
        }

        public String getPayQueryUrl() {
            return payQueryUrl;
        }

        public void setPayQueryUrl(String payQueryUrl) {
            this.payQueryUrl = payQueryUrl;
        }

        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        public String getPriceSw() {
            return priceSw;
        }

        public void setPriceSw(String priceSw) {
            this.priceSw = priceSw;
        }

        public String getPriceHcSn() {
            return priceHcSn;
        }

        public void setPriceHcSn(String priceHcSn) {
            this.priceHcSn = priceHcSn;
        }

        public String getPriceHcSw() {
            return priceHcSw;
        }

        public void setPriceHcSw(String priceHcSw) {
            this.priceHcSw = priceHcSw;
        }

        public String getPriceSn() {
            return priceSn;
        }

        public void setPriceSn(String priceSn) {
            this.priceSn = priceSn;
        }

        public String getQueryUrl() {
            return queryUrl;
        }

        public void setQueryUrl(String queryUrl) {
            this.queryUrl = queryUrl;
        }

        public String getQueryVersion() {
            return queryVersion;
        }

        public void setQueryVersion(String queryVersion) {
            this.queryVersion = queryVersion;
        }

        public String getAppVersion2() {
            return appVersion2;
        }

        public void setAppVersion2(String appVersion2) {
            this.appVersion2 = appVersion2;
        }

        public String getAppVersion() {
            return appVersion;
        }

        public void setAppVersion(String appVersion) {
            this.appVersion = appVersion;
        }

        public String getAppUrl() {
            return appUrl;
        }

        public void setAppUrl(String appUrl) {
            this.appUrl = appUrl;
        }

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getAuthor() {
            return author;
        }

        public void setAuthor(String author) {
            this.author = author;
        }

        public String getAppSecret() {
            return appSecret;
        }

        public void setAppSecret(String appSecret) {
            this.appSecret = appSecret;
        }
    }

    @Bean
    public EmsConfig EmsConfig() {
        return new EmsConfig();
    }


}
